package com.z6school.manage.common.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
public class JsonResult implements Serializable {
    private static final long serialVersionUID = -7597279940778184645L;
    //状态
    private Integer state=1;
    //状态信息
    private  String message = "ok";
    //返回结果
    private Object data;

    public JsonResult(String message){
        this.message = message;
    }
    public JsonResult(Object data){
        this.data = data;
    }
    public JsonResult(Throwable e){
        this.state=0;
        this.message = e.getMessage();
    }
}
